package com.bugreport.trackers.mantis128;

import java.math.BigInteger;

import com.bugreport.model.Issue;
import com.bugreport.trackers.clients.mantis128.IssueData;
import com.bugreport.trackers.clients.mantis128.ObjectRef;

public class IssueDataProxy {

	public static IssueData newIssue(String summary, String description, BigInteger projectId, String category) {

		IssueData issue = new IssueData();
		issue.setSummary(summary);
		issue.setDescription(description);
		issue.setProject(new ObjectRef(projectId, null));
		issue.setCategory(category);

		return issue;
	}

	public static IssueData newIssue(Issue issue, BigInteger projectId, String categoryName) {
		return newIssue(issue.getTitle(), issue.getDescription(), projectId, categoryName);
	}
}
